<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
    
    function unique(arr){            
        for(var i=0; i<arr.length; i++){
            for(var j=i+1; j<arr.length; j++){
                if(arr[i]==arr[j]){         //第一个等同于第二个，splice方法删除第二个
                    arr.splice(j,1);
                    j--;
                }
            }
        }
        return arr;
    }
    //var arr = ['true','true',true,true];
    var arr = [1,1,'true','true',15,15,false,false,true,undefined,undefined, null,null,true,NaN, NaN,'NaN', 0, 0, 'a', 'a',{},{}];
    console.log(unique(arr))
    console.log(1 == true)
    //  
    var a  = [];
    console.log(Boolean(""))
    //Boolean null &&  undefined  => false    String  empty = >false
    //        [] {} fn Number > 0 ==> true
    var data = {name:"11"};
    if(2){
        console.log('222')
    }
    console.log(parseInt('23.82')) //23
    console.log(["1","2","3","4"].map(parseInt)) //返回值  [1,'NaN','NaN'];[].map(function(v,i,arr){})
    var parseInt = function(v,i,arr){

    }
    parseInt("1",0) // 1 
    parseInt("2",1) //NaN
    parseInt("3",2) //NaN
    parseInt("4",3) //NaN
    console.log("2" > "10");
    console.log(new Date().getYear())//返回距离1900的年数。

    //endTime = 1576922400000;
    //00:00:00
    //start 1516922400000  => 16:12
    //end                   => 18:00
    // 8/3 = 
    //8 % 3 =2
    </script>
</body>
</html>